<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>紀錄離開左營高鐵時間</title>
    </head>
    <body>
        <div class="body">
            <h1>紀錄離開左營高鐵時間(目前有${allCount}位運動員已離開旅館前往左營高鐵站的路上)</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            
            <g:form method="post">
				<g:hiddenField name="byForm" value="true" />
				認證號碼：<g:textField name="uidKey" />
				姓名：<g:textField name="nameKey" /><br />
				國別：<g:select name="nationKey" from="${Nation.list()}" optionKey="name" optionValue="name" noSelection="['':'-Choose Nation-']"/>
				運動項目：<g:select name="sportKey" from="${Sport.list()}" optionKey="name" optionValue="name" noSelection="['':'-Choose Sport-']"/><br/>
				預計抵達時間：從<calendar:datePicker name="startComeAt"/> 00:00 到 <calendar:datePicker name="endComeAt"/> 23:59
				<g:actionSubmit action="sTrainLeft" value="撈"/>
			</g:form>
			
			<hr />  
             
             <table>
             <tr>
             	<td>認證號碼</td>
             	<td>姓名</td>
             	<td>國別</td>
            	<td>性別</td>
            	<td>運動項目</td>
            	<td>抵達機場</td>
            	<td>實際離開旅館時間</td>
            	<td>預計抵達左營高鐵站時間</td>
             	<td></td>
             </tr>
             <g:each var="person" in="${people}">
			 	<tr class="mouseOver">
			 		<td>${person.uid}</td>
			 		<td><g:link controller="sportsman" action="show" id="${person.id}">${person.name}</g:link></td>
			 		<td>${person.nation?.name}</td>
					<td>${person.sex}</td>
					<td>${person.sport?.name}</td>
					<td>${person.comeAirport?.name}</td>
					<td><g:formatDate format="MM-dd HH:mm" date="${person.hotelGoAt}" /></td>
			 		<td><g:formatDate format="MM-dd HH:mm" date="${person.predictSTrainGoAt}" /></td>
			 		<td>
			 			<g:link action="sTrainLeft" params="[actionType:'submit', personId:person.id]">確定離開</g:link>
			 			<g:link action="sTrainLeft" params="[actionType:'delete', personId:person.id]">移除紀錄</g:link>
			 		</td>
			 	</tr>
             </g:each>
             </table>

        </div>
    </body>
</html>
